﻿using AttributeDemo.CustomAttribute;
using System;
using System.Collections.Generic;
using System.Text;

namespace AttributeDemo
{
    //[ZiDingYi]
    //[ZiDingYi(1)]
    [ZiDingYi]
    public class People
    {
        /// <summary>
        /// 身份证号
        /// </summary>
        [IdCard]
        public string Idcard { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        [ZiDingYi(1,"123")]
        public string Name { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        public SexEnum Sex { get; set; }
        /// <summary>
        /// 出生日期
        /// </summary>
        [Brithday]
        public DateTime Birthday { get; set; }
        /// <summary>
        /// 家庭住址
        /// </summary>
        public string Address { get; set; }

        [ZiDingYi("123")]
        public void Speak()
        {
            Console.WriteLine($"我的名字是{Name}");
        }
        public void Eat()
        { 
        }
    }
}
